﻿<div class="page-body">
    <div class="row">
        <div class="col-xs-12 col-md-12">
            <div class="widget">
                <div class="widget-header ">
                    <span class="widget-caption">买书订单列表</span>
                    <div class="widget-buttons">
                        <a href="#" data-toggle="maximize">
                            <i class="fa fa-expand"></i>
                        </a>
                        <a href="#" data-toggle="collapse">
                            <i class="fa fa-minus"></i>
                        </a>
                        <a href="#" data-toggle="dispose">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="widget-body">
                    <div class="table-toolbar">
                        <form method="get" action="{:U('index')}" class="form-inline" role="form">
                            <div class="form-group">
                            <span class="input-icon" style="width: 200px;">
                                <input type="text" class="form-control input-sm" placeholder="ID（订单号）,会员卡号"
                                       name="keywords" value="{$Think.get.keywords}">
                                <i class="glyphicon glyphicon-search blue"></i>
                            </span>
                                <button type="submit" class="btn btn-info">搜索</button>
                            </div>
                        </form>
                    </div>

                    <table class="table table-striped table-hover">
                        <thead>
                        <tr>
                            <th>
                                ID（订单号）
                            </th>
                            <th>
                                会员卡号
                            </th>
                            <th>
                                用户
                            </th>
                            <th>
                                图书/数量
                            </th>
                            <th>
                                创建时间
                            </th>
                            <th>
                                支付
                            </th>
                            <th>
                                配送
                            </th>
                            <th>
                                是否手机订单
                            </th>
                            <th></th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="data" id="vo">
                            <tr>
                                <td>{$vo.order_id}</td>
                                <td>{$vo.card_id}</td>
                                <td>
                                    <a href="{:U('User/index',['user_id'=>$vo['user']['user_id']])}">
                                        <a class="show_headimg">显示头像<img src="{$vo.user.headimgurl}" height="100"></a><br>
                                        {$vo.user.nickname}
                                    </a>
                                </td>
                                <td>
                                    <volist name="vo.order_has_book" id="v">
                                        <a href="{:U('Book/index',['keywords'=>$v['spbs']])}">
                                            {$v.sm} * <br>
                                            数量:<span class="label label-default">{$v.quantity}</span><br>
                                            条码：{$v.tm}<br><br>
                                        </a>
                                    </volist>
                                    <volist name="vo.product" id="item">
                                        <a>
                                            积分兑换： {$item.name}
                                        </a>
                                    </volist>
                                </td>
                                <td>{$vo.create_time}</td>
                                <td>
                                    ID：{$vo.pay.pay_id}<br>
                                    支付方式：{$vo.pay.way}<br>
                                    金额：{$vo.pay.money}<br>
                                    支付状态：
                                    <span class="label label-warning">
                                        <switch name="vo.pay.status">
                                            <case value="-1">取消</case>
                                            <case value="0">未支付</case>
                                            <case value="1">支付成功</case>
                                            <case value="2">支付失败</case>
                                            <default/>
                                            default
                                        </switch>
                                    </span>
                                </td>
                                <td>
                                    联系人：{$vo.address.name}<br>
                                    电话：{$vo.address.phone}<br>
                                    地址：{$vo.address.province} {$vo.address.city} {$vo.address.district}<br>
                                    {$vo.address.address}<br>
                                    <span class="label label-lightred">备注:{$vo.order_remark}</span>
                                </td>
                                <td>
                                    <eq name="vo.is_online" value="0">
                                        是
                                        <else/>
                                        不是
                                    </eq>
                                </td>
                                <td>
                                    <switch name="vo.state_order">
                                        <case value="0"><a class="btn btn-xs">等待付款</a></case>
                                        <case value="1">
                                            <a class="btn btn-success btn-xs"
                                               href="{:U('add',array('order_id'=>$vo['order_id']))}">
                                                <i class="fa fa-edit"></i> 发货
                                            </a>
                                        </case>
                                        <case value="2">
                                            <a class="btn btn-success btn-xs"
                                               href="{:U('edit',array('order_id'=>$vo['order_id']))}">
                                                <i class="fa fa-edit"></i> 修改发货信息
                                            </a>
                                        </case>
                                        <case value="3"><a class="btn btn-xs">已签收</a></case>
                                        <default/>
                                    </switch>
                                </td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                    {$page}
                    <form class="form-inline" method="post">
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon">设置页码</div>
                                <input class="form-control" type="text" placeholder="" name="p" value="{$Think.get.p}" style="width: 60px;">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>